libxl: don't leak ptr in libxl_list_vm error case
authorMatthew Daley <mattd@bugfuzz.com>
Tue, 3 Dec 2013 01:29:04 +0000 (14:29 +1300)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 13 Dec 2013 17:20:06 +0000 (17:20 +0000)
commit44ad4f96b7ac6dc328efa60c7087dd198035e199
tree8382fa58f3558d473d4659c0a32dc0f07835431b
parent7e52bfb60520816a218c1505498298926421cd09
libxl: don't leak ptr in libxl_list_vm error case

While at it, tidy up the function; there's no point in allocating more
than the amount of domains actually returned by xc_domain_getinfolist
(barring the caveat described in the newly-added comment)

Coverity-ID: 1055888
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
tools/libxl/libxl.c